import { Model, Post, Get } from "~/utils/annotate";
import { LoginResult, GetCaptchaResult } from "./interface";

@Model('')
export default class LoginService {

    @Post('/login')
    login(res) {
        return new LoginResult(res.code, res).result()
    }

    @Get('/captchaImage')
    getCaptcha(res) {
        return new GetCaptchaResult(res.code, res).result((data) => {
            data.img = '好山好水'
        })
    }
}